home *** CD-ROM | disk | FTP | other *** search
/ 9-Digit Zip Code Directory / 9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO / z4src.zip / BSDEFN.H < prev    next >
C/C++ Source or Header  |  1995-09-11  |  5KB  |  169 lines

  1. //----------------------------------------------------------------------------
  2. //                            MODULE DESCRIPTION
  3. //
  4. //  Module:    bsdefn.h
  5. //   Title:    Base library
  6. //  Notice:    John M. Weeder
  7. //                 Copyright (c) 1993. All rights reserved.
  8. //             This module contains proprietary information and should be 
  9. //                treated as confidential.
  10. //
  11. //----------------------------------------------------------------------------
  12. //                           MAINTENANCE HISTORY
  13. //
  14. // $Workfile$
  15. // $Revision$
  16. //   $Author$
  17. //     $Date$
  18. //      $Log$    
  19. //
  20. //----------------------------------------------------------------------------
  21. //                             MODULE NARRATIVE
  22. //
  23. //
  24. //    This module contains compiler specific preprocessor statements. The goal
  25. //    of this header file is to attempt to recognize the compiler and 
  26. //    environment through predefined macros.
  27. //
  28. //    The code in this module should be written entirely in C. 
  29. //    Do not use any C++ constructs.
  30. //
  31. //    This module is portable to:
  32. //        DOS 3.X+
  33. //        MS Windows 3.X+
  34. //        OS/2 2.X+
  35. //        OS/2 2.0 PM
  36. //        SCO UNIX.
  37. //
  38. //    The following compilers are supported:
  39. //        MSC 6.0A
  40. //        MSC/C++ 7.0
  41. //        Borland C++ 3.1 for DOS
  42. //        Borland C++ 1.0 for OS/2 2.X
  43. //        SCO UNIX cc
  44. //
  45. //----------------------------------------------------------------------------
  46.  
  47.  
  48. //----------------------------------------------------------------------------
  49. //    Misc
  50. //----------------------------------------------------------------------------
  51. #define COMPILE_DEBUG
  52.  
  53.  
  54. //----------------------------------------------------------------------------
  55. //    Compiler and operating system specific directives
  56. //----------------------------------------------------------------------------
  57. #ifdef __BORLANDC__                            // If Borland compiler, set defines.
  58. #    define COMPILER_BORLAND
  59. #     ifdef __DLL__
  60. #        define COMPILE_DLL                    // Windows or OS/2 DLL
  61. #    endif
  62. #     ifdef __MT__                                // Multi-thread OS/2
  63. #        define COMPILE_MT
  64. #    endif
  65. #     ifdef __MSDOS__                            // MS-DOS
  66. #        define OS_DOS
  67. #    endif
  68. #     ifdef __OS2__                                // OS/2 2.X
  69. #        define OS_OS2
  70. #    endif
  71. #  if __cplusplus                                // C++ file?
  72. #        define COMPILE_CPP
  73. #     endif
  74. #     ifdef _Windows                                // Windows 3.X
  75. #         define OS_WINDOWS
  76. #        undef OS_DOS
  77. #     endif
  78. #elif _MSC_VER                                    // Microjunk C 6.0/7.0
  79. #  define COMPILER_MSC
  80. #    if (_MSC_VER <= 600)
  81. #        pragma message("Microsoft 6.0 compile")
  82. #      define COMPILER_MSC_6
  83. #     else
  84. #        pragma message("Microsoft 7.0 compile")
  85. #      define COMPILER_MSC_7
  86. #    endif
  87. #     ifdef _WINDOWS                                // Windows 3.X
  88. #        pragma message("Windows 3.X Target Operating System")
  89. #         define OS_WINDOWS
  90. #     elif MSDOS                                    // DOS compiler
  91. #        pragma message("MS-DOS Target Operating System")
  92. #         define OS_DOS                            
  93. #       endif
  94. #       ifdef _OS2                                                                                    // MSC OS/2 1.3 compiler
  95. #        pragma message("OS/2 1.3 Target Operating System")
  96. #         define OS_OS2
  97. #     endif
  98. #     ifdef _WINDLL                                // Windows DLL
  99. #        pragma message("Windows DLL")
  100. #         define COMPILE_DLL
  101. #     endif
  102. #  if __cplusplus                                // C++ file?
  103. #        pragma message("C++ compilation")
  104. #        define COMPILE_CPP
  105. #     endif
  106. #    pragma pack(1)                                // Zinc requires byte alignment
  107. #elif M_UNIX                                    // SCO UNIX
  108. #    define OS_UNIX
  109. #    define COMPILER_UNIX
  110. #else                                                // Otherwise, default to ANSI
  111. #    define OS_ANSI
  112. #    define COMPILER_ANSI
  113. #endif
  114.  
  115.  
  116. //----------------------------------------------------------------------------
  117. //    Set windows version
  118. //----------------------------------------------------------------------------
  119. #ifdef OS_WINDOWS
  120. #ifndef WINVER
  121. #define WINVER (0x0300)                        // Windows 3.0+
  122. #endif
  123. #ifndef STRICT                                    // Strict type matching!
  124. #define STRICT
  125. #endif
  126. #endif
  127.  ////////////////////////////////////////////////////////////////////////////////
  128. //@topic Warnings | The following warnings are disabled:<nl>
  129. // C4094<nl>
  130. // C4103 - pragma pack used to change packing<nl>
  131. // C4127 - Conditional constant (Debug only, because of asserts)<nl>
  132. // C4147<nl>
  133. // C4201 - nameless unions are part of C++<nl>
  134. // C4211<nl>
  135. // C4514 - Unreferenced inline functions are allowed<nl>
  136. // C4699<nl>
  137. // C4702 - unreachable code caused by optimizations<nl>
  138. // C4704<nl>
  139. // C4705 - Statement has no effect, OK in debug<nl>
  140. //@devnote PC-Lint should be used on all files in order to eliminate all
  141. // warnings.
  142. #ifdef COMPILER_MSC
  143. #    ifndef ALL_WARNINGS
  144. #        pragma warning(disable: 4094)
  145. #        pragma warning(disable: 4103)
  146. #        pragma warning(disable: 4147)
  147. #               pragma warning(disable: 4201)
  148. #        pragma warning(disable: 4211)
  149. #        pragma warning(disable: 4514)
  150. #        pragma warning(disable: 4699)
  151. #        pragma warning(disable: 4209)
  152. #        pragma warning(disable: 4214)
  153. #        pragma warning(disable: 4001)
  154. #        pragma warning(disable: 4505)
  155. #        ifdef COMPILE_DEBUG
  156. #            pragma warning(disable: 4705)
  157. #            pragma warning(disable: 4127)
  158. #        else
  159. #                       pragma warning(disable: 4702)
  160. #            pragma warning(1:4705; 2:4705; 3:4705; 4:4705)
  161. #        endif
  162. #        pragma warning(disable: 4704)
  163. #    endif
  164. #endif
  165.  
  166. //----------------------------------------------------------------------------
  167. //------------------------------- End of File --------------------------------
  168. //----------------------------------------------------------------------------
  169.